//
//  LLTransactionRecordsTableViewCell.m
//  LoveLove
//
//  Created by 达迩科技 on 2019/4/9.
//  Copyright © 2019 wkf. All rights reserved.
//

#import "LLTransactionRecordsTableViewCell.h"

@implementation LLTransactionRecordsTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initView];
    }
    return self;
}

- (void)initView{
    self.headImage = [[UIImageView alloc] initWithFrame:CGRectMake(15, 10, 30, 50)];
    self.headImage.image = [UIImage imageNamed:@"课程图片"];
    self.headImage.contentMode = UIViewContentModeScaleAspectFill;
    [self.contentView addSubview:self.headImage];
    
    self.titleLabel = [LLInitBaseViewTool labelWithText:@"流浪地球" textColor:LLColorRGB(0) font:14 textAlignment:NSTextAlignmentLeft];
    self.titleLabel.frame = CGRectMake(60, 15, LLScreenWidth-210, 14);
    [self.contentView addSubview:self.titleLabel];
    
    self.subtitleLabel = [LLInitBaseViewTool labelWithText:@"2019.1.11 9:20" textColor:LLColorRGB(127) font:12 textAlignment:NSTextAlignmentLeft];
    self.subtitleLabel.frame = CGRectMake(60, 40, LLScreenWidth-210, 12);
    [self.contentView addSubview:self.subtitleLabel];
    
    self.priceLabel = [LLInitBaseViewTool labelWithText:@"0.00元" textColor:LLColorRGB(0) font:15 textAlignment:NSTextAlignmentRight];
    self.priceLabel.frame = CGRectMake(LLScreenWidth-100, 32, 68, 15);
    [self.contentView addSubview:self.priceLabel];
    NSMutableAttributedString *AttributedStr = [[NSMutableAttributedString alloc]initWithString:self.priceLabel.text];
    NSRange range1 = [self.priceLabel.text rangeOfString:@"元"];
    [AttributedStr addAttribute:NSFontAttributeName value:LLRegularFont(12) range:range1];
    self.priceLabel.attributedText = AttributedStr;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
